<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="template/header.jsp"%>
<center>
	<p>
		<b>page de gestion des réclamations</b>
	</p>
</center>
<br/><br/>
<table class="tbl_con">
	<caption class='center'>Liste des réclamations</caption>
	<thead>
		<tr>
			<th class="th1">référence</th>
			<th class="th1">traité?</th>
			<th class="th1">type</th>
			<th class="th1">Date de la réclamation</th>
			<th class="th1">Date de réception par le Dpt Mkt</th>
			<th class="th1">Support</th>
			<th class="th1">Dpt concerné</th>
			<th class="th1">Date de transfert au Dpt concerné</th>
			<th class="th1">Date retour au dpt Mkt</th>
			<th class="th1">Accepté?</th>
			<th class="th1">Date réponse</th>
			<th class="th1">Support de réponse</th>
			<th class="th1">Réponse donnée</th>
			<th class="th1">Action</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${fetchedRec}" var="rec">
			<tr>
				<td class="td1"><c:out value="${rec.ref}"></c:out></td>
				<td class="td1"><c:choose>
						<c:when test="${rec.isDone}">
							<c:out value="traité">
							</c:out>
						</c:when>
						<c:otherwise>
							<c:out value="en cours">
							</c:out>
						</c:otherwise>
					</c:choose></td>
				<td class="td1"><c:out value="${rec.type}"></c:out></td>
				<td class="td1"><c:out value="${rec.dateRec}"></c:out></td>
				<td class="td1"><c:out value="${rec.dateRecMDept}"></c:out></td>
				<td class="td1"><c:out value="${rec.support}"></c:out></td>
				<td class="td1"><c:out value="${rec.dept.deptName}"></c:out></td>
				<td class="td1"><c:out value="${rec.trConcerDeptDate}"></c:out></td>
				<td class="td1"><c:out value="${rec.trRetMarDptDate}"></c:out></td>
				<td class="td1"><c:choose>
						<c:when test="${rec.accepted}">
							<c:out value="oui">
							</c:out>
						</c:when>
						<c:otherwise>
							<c:out value="non">
							</c:out>
						</c:otherwise>
					</c:choose></td>
				<td class="td1"><c:out value="${rec.repDate}"></c:out></td>
				<td class="td1"><c:out value="${rec.repSupport}"></c:out></td>
				<td class="td1"><c:out value="${rec.rep}"></c:out></td>
				<td class="td1"><select
					onchange="location = this.options[this.selectedIndex].value;">
						<option>--Action--</option>
						<option value="update?recId=<c:out value="${rec.id}"/>">modifier</option>
						<option value="delete?recId=<c:out value="${rec.id}"/>">supprimer</option>
				</select></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
<a class="create_Rec" href="/reclamation/add">+ajouter une réclamation</a>
<!-- User:<c:out value="${user}"></c:out> -->
<%@include file="template/footer.jsp"%>
